<!--

/*
* Copyright (C) 2005-2013 University of Sydney
*
* Licensed under the GNU License, Version 3.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at
*
* http://www.gnu.org/licenses/gpl-3.0.txt
*
* Unless required by applicable law or agreed to in writing, software distributed under the License
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/

/**
* woot frame interface
*
* @author      Kim Jackson
* @copyright   (C) 2005-2013 University of Sydney
* @link        http://Sydney.edu.au/Heurist
* @version     3.1.0
* @license     http://www.gnu.org/licenses/gpl-3.0.txt GNU License 3.0
* @package     Heurist academic knowledge management system
* @subpackage  !!!subpackagename for file such as Administration, Search, Edit, Application, Library
*/

-->

<html>
<head>
<title>Heurist WOOT</title>
<link rel=stylesheet href="../../common/css/woot.css">
<script src="../../common/php/loadHAPI.php"></script>
<script src="../../external/tinymce/jscripts/tiny_mce/tiny_mce.js"></script>
<script src="woot.js"></script>

<script>
var wootEditor;
function init() {
	var wootTitle;
	var pageTitle;

	// extract the woot name from the URI
	var matches = location.href.match(/w=([^&]*)/);
	if (matches  &&  matches[1]) {
		wootTitle = decodeURIComponent(matches[1].replace(/\+/g, "%20"));
	} else {
		 alert("no woot title provided!");
	}

	// extract the page title from the URI
	matches = location.href.match(/t=([^&]*)/);
	if (matches  &&  matches[1]) {
		pageTitle = decodeURIComponent(matches[1].replace(/\+/g, "%20"));
	}

	if (! pageTitle) pageTitle = wootTitle;

	document.title = pageTitle + " - Heurist WOOT";

	document.getElementById("title").innerHTML = pageTitle;

	HAPI.WOOT.GUI.labelsForLanguage.en.emptyMessage.label = "&lt;&lt; Empty or no visible text blocks &gt;&gt;";

	wootEditor = new HAPI.WOOT.GUI.WootEditor({ title: wootTitle, id: "woot" });
}
</script>

<style>

.woot-title {
	display: none;
}

</style>

</head>
<body onload="init();">

<h1 id=title></h1>
<div id=woot></div>

</body>
</html>
